package com.ding.eduservice.controller;

import com.ding.commonutils.Result;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin //解决跨域
public class EduLoginController {

    @PostMapping("login")
    public Result enter(){
        return Result.ok().data("token","admin");
    }

    @GetMapping("getinfo")
    public Result info(){
        return Result.ok().data("roles","[admin]")
                .data("name","admin")
                .data("avatar","https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2986114791,2667770254&fm=26&gp=0.jpg");
    }
}
